.box {
  overflow: hidden;
  width: 100%;
  height: 100vh;
  background: url('/imgs/indexLightBackground.png');
  border-radius: 10px;
  border: 1px solid #1e90ff;
  box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.1);
  background-size: 100% 100%;
  background-repeat: no-repeat;
  .header {
    width: 100%;
    height: 80px;
    background: url('/imgs/ceil-day.png');
    background-size: 100% 100%;
    background-repeat: no-repeat;
    position: relative;
    div {
      display: flex;
      position: absolute;
      right: 2%;
      margin-top: 10px;
    }
  }
  .floor {
    width: 100%;
    height: 80px;
    background: url('/imgs/floor-day.png');
    background-size: 100% 100%;
    background-repeat: no-repeat;
    position: absolute;
    bottom: 0;
  }

  .left {
    width: 30%;
    height: 75%;
    position: absolute;
    left: 3%;
    top: 24%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
  }

  .canvas-avatar-wrap {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .canvas-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .canvas-input {
    width: 100%;
    padding: 6px 10px;
    border: 2px solid #1e90ff;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.9);
    font-size: 12px;
    outline: none;
    transition: all 0.3s ease;
  }

  .canvas-input:focus {
    border-color: #0056b3;
    box-shadow: 0 0 10px rgba(30, 144, 255, 0.3);
  }

  .canvas-input::placeholder {
    color: #999;
  }

  .right {
    width: 65%;
    height: 75%;
    background: url('/imgs/border-day.png');
    background-size: 100% 100%;
    background-repeat: no-repeat;
    position: absolute;
    right: 3%;
    top: 24%;
    overflow: visible;
  }
  .speak {
    width: 60px;
    height: 60px;
    background: url('/imgs/speaking.jpeg');
    background-size: 100% 100%;
    background-repeat: no-repeat;
    position: absolute;
    right: 35.5%;
    top: 83%;
    transform: translateX(50%);
    z-index: 10;
    border-radius: 50%;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  }

  .speak:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  }

  .speak:active {
    transform: scale(0.95);
  }

  .canvas-video {
    position: absolute;
    left: 6%;
    top: 10%;
    width: 88%;
    height: 78%;
    border-radius: 12px;
    background: #000;
    box-shadow: 0 2px 16px #1e90ff55;
    object-fit: cover;
  }

  .canvas-control-box {
    background: #232a36;
    border-radius: 12px;
    box-shadow:
      0 4px 24px #0008,
      0 0 0 2px #2e3a4d;
    padding: 10px;
    width: 260px;
    color: #fff;
    position: relative;
  }
  .canvas-control-drag {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 4px;
    margin-bottom: 8px;
  }
  .canvas-control-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #555a65;
    display: inline-block;
  }
  .canvas-control-title {
    font-size: 15px;
    font-weight: 500;
    margin-bottom: 8px;
    color: #bfc6d1;
  }
  .canvas-control-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 0;
  }
  .canvas-control-select {
    background: #181d23;
    color: #bfc6d1;
    border: 1px solid #3b6fff;
    border-radius: 6px;
    padding: 2px 12px;
    font-size: 14px;
    height: 28px;
  }
  .canvas-control-divider {
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, #3b6fff 0%, #232a36 100%);
    margin: 8px 0 10px 0;
    border: none;
  }
}

/* 响应式设计 */
@media (max-width: 768px) {
  .box {
    .left {
      width: 100%;
      position: relative;
      top: 0;
      left: 0;
      padding: 20px;
    }

    .right {
      width: 100%;
      position: relative;
      top: 0;
      right: 0;
      margin-top: 20px;
    }

    .canvas-control-box {
      width: 100%;
      max-width: 300px;
    }
  }
}

.danmu-container {
  pointer-events: none;
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  z-index: 10;
  overflow: hidden;
}

.danmu-item {
  position: absolute;
  left: 100%;
  white-space: nowrap;
  color: #fff;
  font-size: 16px;
  font-weight: bold;
  text-shadow:
    1px 1px 2px #000,
    0 0 4px #1e90ff;
  animation: danmu-move 6s linear forwards;
  pointer-events: none;
}

@keyframes danmu-move {
  0% {
    left: 100%;
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  100% {
    left: -100%;
    opacity: 0;
  }
}

/* 弹幕闪烁效果 */
@keyframes danmu-blink {
  0%, 50% { opacity: 1; }
  25%, 75% { opacity: 0.7; }
}

/* 弹幕缩放效果 */
@keyframes danmu-scale {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

/* 弹幕旋转效果 */
@keyframes danmu-rotate {
  0% { transform: rotate(0deg); }
  25% { transform: rotate(1deg); }
  75% { transform: rotate(-1deg); }
  100% { transform: rotate(0deg); }
}

.danmu-send-btn {
  background: #1e90ff;
  color: #fff;
  border: none;
  border-radius: 16px;
  padding: 4px 16px;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.2s;
}
.danmu-send-btn:hover {
  background: #0056b3;
}

/* 弹幕样式变体 */
.danmu-item.highlight {
  font-weight: bold;
  font-size: 24px;
  text-shadow: 
    2px 2px 4px #000,
    0 0 8px #ff4d4f,
    0 0 12px #ff4d4f;
  animation: danmu-move 6s linear forwards, danmu-blink 2s ease-in-out infinite;
}

.danmu-item.elegant {
  font-family: 'Times New Roman', serif;
  font-style: italic;
  font-size: 18px;
  text-shadow: 
    1px 1px 2px #000,
    0 0 6px #9254de;
}

.danmu-item.vibrant {
  font-weight: bold;
  font-size: 22px;
  text-shadow: 
    1px 1px 2px #000,
    0 0 8px #fadb14,
    0 0 12px #fadb14;
  animation: danmu-move 6s linear forwards, danmu-scale 3s ease-in-out infinite;
}

.danmu-item.fresh {
  font-size: 19px;
  text-shadow: 
    1px 1px 2px #000,
    0 0 6px #36cfc9;
  animation: danmu-move 6s linear forwards, danmu-rotate 4s ease-in-out infinite;
}

/* 弹幕输入框样式 */
.danmu-input-container {
  background: rgba(0,0,0,0.8);
  border-radius: 16px;
  padding: 12px 16px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.2);
}

.danmu-style-btn {
  padding: 4px 8px;
  font-size: 12px;
  border-radius: 6px;
  border: 1px solid #d9d9d9;
  background: transparent;
  cursor: pointer;
  transition: all 0.2s;
}

.danmu-style-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.danmu-style-btn.active {
  border-color: #1890ff;
  background: #e6f7ff;
  color: #1890ff;
}

.danmu-color-dot {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  cursor: pointer;
  border: 1px solid #d9d9d9;
  transition: all 0.2s;
}

.danmu-color-dot:hover {
  transform: scale(1.1);
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.danmu-color-dot.selected {
  border: 2px solid #fff;
  box-shadow: 0 0 8px rgba(255,255,255,0.5);
}
.chart{
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 100;
  background: rgba(255,255,255,0.98);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

/* 语音聊天框样式 */
.voice-chat {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 100;
  background: rgba(255,255,255,0.98);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  backdrop-filter: blur(8px);
}

.voice-chat-content {
  background: white;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 400px;
  height: 500px;
  cursor: default;
  box-shadow: 0 8px 32px rgba(0,0,0,0.15);
  border-radius: 16px;
  padding: 24px;
  animation: voiceChatSlideIn 0.3s ease-out;
}

@keyframes voiceChatSlideIn {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.voice-result-display {
  width: 100%;
  min-height: 60px;
  margin-bottom: 16px;
  background: #f8f9fa;
  border-radius: 12px;
  padding: 12px;
  border: 2px solid #e9ecef;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.voice-result-display.recording {
  border-color: #28a745;
  background: #f8fff9;
  box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.1);
}

.voice-chat-messages {
  flex: 1;
  width: 100%;
  background: #f8f9fa;
  border-radius: 12px;
  padding: 12px;
  overflow-y: auto;
  max-height: 200px;
  margin-bottom: 16px;
}

.voice-chat-button {
  flex: 1;
  height: 50px;
  border-radius: 25px;
  border: none;
  background: #28a745;
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.3s ease;
}

.voice-chat-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

.voice-chat-button.recording {
  background: #dc3545;
}

.voice-chat-button.recording:hover {
  box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}

.voice-chat-button:disabled {
  background: #6c757d;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.voice-message {
  text-align: right;
  margin: 8px 0;
  display: flex;
  justify-content: flex-end;
}

.voice-message.ai {
  text-align: left;
  justify-content: flex-start;
}

.voice-message-bubble {
  background: #007bff;
  color: #fff;
  border-radius: 16px;
  padding: 8px 12px;
  font-size: 14px;
  max-width: 250px;
  word-break: break-all;
  display: inline-block;
}

.voice-message.ai .voice-message-bubble {
  background: #e9ecef;
  color: #333;
}

.voice-message-icon {
  font-size: 12px;
  margin-right: 4px;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .voice-chat-content {
    width: 90%;
    height: 80%;
    max-width: 400px;
  }
  
  .voice-chat-button {
    height: 45px;
    font-size: 14px;
  }
}